3.36 \(\int \frac {\cos (a+\frac {b}{x})}{x} \, dx\)

Optimal. Leaf size=20 \[ \sin (a) \text {Si}\left (\frac {b}{x}\right )-\cos (a) \text {Ci}\left (\frac {b}{x}\right ) \]

[Out]

-Ci(b/x)*cos(a)+Si(b/x)*sin(a)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3378, 3376, 3375} \[ \sin (a) \text {Si}\left (\frac {b}{x}\right )-\cos (a) \text {CosIntegral}\left (\frac {b}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b/x]/x,x]

[Out]

-(Cos[a]*CosIntegral[b/x]) + Sin[a]*SinIntegral[b/x]

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rubi steps

\begin {align*} \int \frac {\cos \left (a+\frac {b}{x}\right )}{x} \, dx &=\cos (a) \int \frac {\cos \left (\frac {b}{x}\right )}{x} \, dx-\sin (a) \int \frac {\sin \left (\frac {b}{x}\right )}{x} \, dx\\ &=-\cos (a) \text {Ci}\left (\frac {b}{x}\right )+\sin (a) \text {Si}\left (\frac {b}{x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 20, normalized size = 1.00 \[ \sin (a) \text {Si}\left (\frac {b}{x}\right )-\cos (a) \text {Ci}\left (\frac {b}{x}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b/x]/x,x]

[Out]

-(Cos[a]*CosIntegral[b/x]) + Sin[a]*SinIntegral[b/x]

________________________________________________________________________________________

fricas [A]  time = 1.43, size = 28, normalized size = 1.40 \[ -\frac {1}{2} \, {\left (\operatorname {Ci}\left (\frac {b}{x}\right ) + \operatorname {Ci}\left (-\frac {b}{x}\right )\right )} \cos \relax (a) + \sin \relax (a) \operatorname {Si}\left (\frac {b}{x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x,x, algorithm="fricas")

[Out]

-1/2*(cos_integral(b/x) + cos_integral(-b/x))*cos(a) + sin(a)*sin_integral(b/x)

________________________________________________________________________________________

giac [B]  time = 0.41, size = 41, normalized size = 2.05 \[ -\frac {b \cos \relax (a) \operatorname {Ci}\left (-a + \frac {a x + b}{x}\right ) + b \sin \relax (a) \operatorname {Si}\left (a - \frac {a x + b}{x}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x,x, algorithm="giac")

[Out]

-(b*cos(a)*cos_integral(-a + (a*x + b)/x) + b*sin(a)*sin_integral(a - (a*x + b)/x))/b

________________________________________________________________________________________

maple [A]  time = 0.04, size = 21, normalized size = 1.05 \[ -\Ci \left (\frac {b}{x}\right ) \cos \relax (a )+\Si \left (\frac {b}{x}\right ) \sin \relax (a ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b/x)/x,x)

[Out]

-Ci(b/x)*cos(a)+Si(b/x)*sin(a)

________________________________________________________________________________________

maxima [C]  time = 2.01, size = 43, normalized size = 2.15 \[ -\frac {1}{2} \, {\left ({\rm Ei}\left (\frac {i \, b}{x}\right ) + {\rm Ei}\left (-\frac {i \, b}{x}\right )\right )} \cos \relax (a) - \frac {1}{2} \, {\left (i \, {\rm Ei}\left (\frac {i \, b}{x}\right ) - i \, {\rm Ei}\left (-\frac {i \, b}{x}\right )\right )} \sin \relax (a) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x,x, algorithm="maxima")

[Out]

-1/2*(Ei(I*b/x) + Ei(-I*b/x))*cos(a) - 1/2*(I*Ei(I*b/x) - I*Ei(-I*b/x))*sin(a)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.05 \[ \sin \relax (a)\,\mathrm {sinint}\left (\frac {b}{x}\right )-\cos \relax (a)\,\mathrm {cosint}\left (\frac {b}{x}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b/x)/x,x)

[Out]

sin(a)*sinint(b/x) - cos(a)*cosint(b/x)

________________________________________________________________________________________

sympy [A]  time = 0.97, size = 15, normalized size = 0.75 \[ \sin {\relax (a )} \operatorname {Si}{\left (\frac {b}{x} \right )} - \cos {\relax (a )} \operatorname {Ci}{\left (\frac {b}{x} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x,x)

[Out]

sin(a)*Si(b/x) - cos(a)*Ci(b/x)

________________________________________________________________________________________